package com.tz.crm.service.impl;

import com.tz.crm.dao.ContractTemplateDao;
import com.tz.crm.entity.ContractTemplate;
import com.tz.crm.service.ContractTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 查询启用合同服务类
 */
@Service
@Transactional
public class ContractTemplateServiceImpl extends BaseServiceImpl<ContractTemplate, String> implements ContractTemplateService {

    @Autowired
    private ContractTemplateDao contractTemplateDao;

    /**
     * 有参构造
     *
     * @param contractTemplateDao 注入的组件
     */
    @Autowired
    public ContractTemplateServiceImpl(ContractTemplateDao contractTemplateDao) {
        this.contractTemplateDao = contractTemplateDao;
        super.setBaseDao(contractTemplateDao);
    }

    @Override
    public List<ContractTemplate> getUsingTemplates() {
        return contractTemplateDao.getUsingTemplates();
    }

}
